home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows4 / pcproj.zip / MSTONEDI.CLS < prev    next >
Text File  |  1988-10-07  |  1KB  |  54 lines

  1. /* Display and edit the Milestone settings.
  2.    This class descends from class ActivDialog
  3.    and inherits all of its methods and operations.
  4. */!!
  5.  
  6. inherit(ActivDialog, #MStoneDialog, nil, 2, nil)!!
  7.  
  8. now(MStoneDialogClass)!!
  9.  
  10. now(MStoneDialog)!!
  11.  
  12. /* Set the values of the activity. */
  13. Def  setValues(self | ues, ulf)
  14. {
  15.   ues := checkDate(getItemText(self, UES));
  16.   ulf := checkDate(getItemText(self, ULF));
  17.   setValues(activity, tuple(
  18.       getItemText(self, NAME),
  19.       getItemText(self, DESC),
  20.       ues,
  21.       ulf));
  22. }!!
  23.  
  24. /* Return the resource ID that should be used with this
  25.    dialog box. */
  26. Def  res(self)
  27. {
  28.   ^MSTONE_BOX;
  29. }!!
  30.  
  31. /* Update the activity after Ok was pressed.
  32.    Descendants should define their own setValues(). */
  33. Def  update(self)
  34. {
  35.   setName(activity, getItemText(self, NAME));
  36.   addNode(getNetwork(activity), activity);
  37.   
  38.   checkConnection(activity,
  39.           getItemText(self, INPUT),
  40.           getItemText(self, OUTPUT));
  41.   
  42.   setValues(self);
  43. } !!
  44.  
  45. /* Initialize all of the fields in the dialog. */
  46. Def  initDialog(self, wp, lp)
  47. {
  48.   initDialog(self:ActivDialog, wp, lp);  /* use ancestor init */
  49.   setItemText(self, INPUT, getInputNames(activity));
  50.   setItemText(self, OUTPUT, getOutputNames(activity));
  51. }!!
  52.  
  53.  
  54.